﻿using Microsoft.Extensions.Configuration;

namespace XKPlatform.Common
{
    public class CfgHelper<T> where T : new()
    {
        public static T BindCfg(string key)
        {
            T t = new T();
            HttpContextCore.Configuration.Bind(key, t);
            return t;
        }

        public static T BindKeyVault()
        {
            T t = new T();
            HttpContextCore.Configuration.Bind(t);
            return t;
        }

    }
}
